<?php

/**
 * @author Thibaut Cromphaut, Gaïtano Boeraeve, Mathias Helin, Dimitry Dierickx
 * @copyright  Copyright (c) 2011 Artevelde University College Ghent 
 */

class Application_Form_Element_ShelfSelect extends Zend_Form_Element_Select {
    public function init() {
        $shelf = new Application_Model_Shelf();
        $this->addMultiOption(0, 'Kies ...');        
        $this->setLabel('Rek:');
        $shelfMapper = new Application_Model_ShelfMapper();
      
        foreach ($shelfMapper->fetchAll() as $shelf) {
            $this->addMultiOption($shelf->getId(), $shelf->getLabel());
        }
    }
}